The invention relates generally to the field of image processing, and more particularly to a system and method for enhancing scanned document images.
Two-sided documents, i.e., documents having text and/or pictorial content on both sides of the paper, present challenges for producing quality copies of the original documents. When two-sided documents are scanned in a copy machine or a scanner, visual noise may appear in the copies that was not present on the scanned surfaces of the original documents. The visual noise may be the result of digitally captured text and/or pictorial content printed on the opposite side of a scanned surface. Visual noise may also appear in copies when multiple documents are placed on a scanning device. In this situation, the visual noise may be the result of digitally captured text and/or pictorial content on a document that was adjacent to the scanned document. The appearance of visual noise caused by unwanted text and/or pictorial content will be referred to herein as the xe2x80x9csee-throughxe2x80x9d effect.
The see-through effect is more prevalent for copies of documents having a white or very light color background. In addition, the thickness of the scanned documents may increase the intensity of the visual noise, since thinner paper is more transparent than thicker paper. In general, documents typically contain black characters that are printed on thin white paper. Thus, the quality of document copies can be significantly increased if the visual xe2x80x9csee-throughxe2x80x9d noise can be effectively removed from the copies.
In addition to the see-through problem, another copy quality issue arises when documents are reproduced using color scanners and color printers. This copy quality issue is the appearance of color fringes around the reproduced text. These color fringes are primarily due to scanning and printing errors. The scanning and printing errors cause the edges of the text in the copies to appear to be something other than black. The appearance of color fringes is a significant factor that degrades the overall quality of document copies.
Conventional image enhancement approaches use variations of unsharp-masking to sharpen features in digitally captured document images. For example, according to one method, the sharpness is altered in the reproduction of an electronically encoded natural scene image by applying a filter function that increases maximum local contrast to a predetermined target value and increases all other contrast to an amount proportional thereto. According to another method, an adaptive spatial filter for digital image processing selectively performs spatial high pass filtering of an input digital signal to produce output pixel values having enhanced signal levels using a gain factor that effects a variable degree of enhancement of the input pixels. Thus, the pixels with activity values that are close to an iteratively adjustable activity threshold level will be emphasized significantly less than the pixels with associated activity values that are substantially above the threshold level. In still another method, a spatial-filter performs an adaptive edge-enhancement process that enhances the sharpness of edges, which are parts of an image having steep tone gradients.
These conventional image enhancement approaches are effective for their intended purposes. However, these conventional methods do not address the problems of color fringe and see-through. In view of this deficiency, there is a need for a system and method to enhance scanned document images by eliminating or reducing color fringes and visual xe2x80x9csee-throughxe2x80x9d noise.
A system and method for enhancing scanned document images utilizes an estimated background luminance of a given digital image to remove or reduce visual xe2x80x9csee-throughxe2x80x9d noise. In addition to the see-through removal, the system and method may further enhance the scanned document images by removing color fringes and sharpening and/or darkening edges of text contained in the images. These image enhancements allow the system and method to significantly increase the overall quality of the scanned document images.
In an exemplary embodiment, the system includes an edge detector, a background luminance estimator, and an image enhancer. These components may be implemented in any combination of hardware, firmware and software. In one embodiment, these components are embodied in the system as software that is executable by a processor of the system.
The edge detector operates to detect edges of text contained in a given digital image containing visual noise. The background luminance estimator operates to generate a background threshold that is based on an estimation of the image background luminance. The background threshold is dependent on the luminance values of the edge pixels of the detected edges. In one embodiment, the background threshold is generated using only the edge pixels that are on the lighter side of the detected edges. The image enhancer operates to at least partially remove the visual noise by selectively modifying pixel values of the image using the background threshold. The image enhancer may also perform color fringe removal and text enhancements, such as edge sharpening and edge darkening.
In an exemplary embodiment, the method in accordance with the invention includes the steps of receiving a digital image that contains visual noise, detecting edges of text contained in the digital image, and generating a background threshold based on an estimation of the image background luminance. The background threshold is dependent on the luminance values of the edge pixels of the text edges contained in the image. In one embodiment, the background threshold is generated using only the edge pixels that are on the lighter side of the detected edges. The method further includes a step of modifying pixel values of the image using the background threshold to at least partially remove the visual noise from the image. The method may also include the step of selectively removing color data from the edges pixels to reduce color fringe or the step of enhancing the text contained in the image by sharpening or darkening the text edges.
Other aspects and advantages of the present invention will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, illustrated by way of example of the principles of the invention.